<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		
		<script>
			var str="987366988";
			
			var re =/^[1-9]\d{4,10}$/g;
			
			console.log(str.match(re));
			console.log(re.test(str));
		</script>
	</body>
</html>
